<?php

namespace Topxia\WebBundle\Extensions\DataTag;

use Topxia\WebBundle\Extensions\DataTag\DataTag;

class ArticleCategoryByIdDataTag extends BaseDataTag implements DataTag  
{
    /**
     * 获取资讯栏目
     *
     * categoryId 必需 分类ID
     *
     * @param  array $arguments 参数
     * @return array 栏目
     */
    public function getData(array $arguments)
    {   
        $id = $arguments['id'];
        return $this->getCategoryService()->getCategory($id);
    }

    protected function getCategoryService()
    {
        return $this->getServiceKernel()->createService('Article.CategoryService');
    }

}